package com.gdssoft.pdaweb.dao.impl;

/*
 *  捷达世软件(深圳)有限公司
 *  Copyright (C) 2008-2010 ShenZhen JieDaShi Software Limited Company.
 */

import java.util.List;

import com.gdssoft.core.dao.impl.BaseDaoImpl;
import com.gdssoft.pdaweb.dao.PdaPlanDetailDao;
import com.gdssoft.pdaweb.model.PdaPlanDetail;

@SuppressWarnings("unchecked")
public class PdaPlanDetailDaoImpl extends BaseDaoImpl<PdaPlanDetail> implements
		PdaPlanDetailDao {
	public PdaPlanDetailDaoImpl() {
		super(PdaPlanDetail.class);
	}

	@Override
	public List<PdaPlanDetail> getByPlanId(long planId, int type) {
		String hql = "from PdaPlanDetail p where p.planId=? and p.type=?";
		return findByHql(hql, new Object[]{planId,type});
	}

	@Override
	public int delByPlanId(Long planId, int type) {
//		String sql="delete from pda_plan_detail where planId="+planId+" and type="+type;
//		jdbcTemplate.execute(sql);		
		return 1;
	}
}
